package com.example.javabasic.shejimoshi.celve.demo1;

//环境类
public class Context {
    private Strategy strategy;

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    //执行策略方法
    public void strategyMethod() {
        strategy.strategyMethod();
    }

}
